package cn.kimming.wms.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.kimming.wms.dao.IEmployeeDAO;
import cn.kimming.wms.dao.IRoleDAO;
import cn.kimming.wms.domain.Employee;
import cn.kimming.wms.domain.Role;
import cn.kimming.wms.query.QueryObject;
import cn.kimming.wms.service.IRoleService;

@Service("roleService")
public class RoleServiceImpl implements IRoleService{
	
	@Autowired
	private IRoleDAO roleDAO;
	@Autowired
	private IEmployeeDAO employeeDAO;
	
	@Override
	public void save(Role r) {
		roleDAO.save(r);
	}

	@Override
	public void update(Role r) {
		roleDAO.update(r);
	}

	@Override
	public void delete(Long id) {
		roleDAO.delete(roleDAO.get(id));
	}

	@Override
	public Role get(Long id) {
		return roleDAO.get(id);
	}

	@Override
	public List<Role> list() {
		return roleDAO.list();
	}

	@Override
	public List<Role> query(QueryObject qo) {
		return roleDAO.query(qo);
	}

	
}
